<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:mo="https://gitee.com/aun/Timo">
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})">
</head>
<body class="timo-layout-page">
    <div class="layui-card">
        <div class="layui-card-header timo-card-header">
            <span><i class="fa fa-bars"></i> 团队总览</span>
            <i class="layui-icon layui-icon-refresh refresh-btn"></i>
        </div>
        <div class="layui-card-body">
            <div class="layui-row timo-card-screen">
                <div class="pull-left layui-form-pane timo-search-box">

                    <div class="layui-inline">
                        <label class="layui-form-label">团队名</label>
                        <div class="layui-input-block">
                            <input type="text" name="team_name" th:value="${param.team_name}" placeholder="请输入团队名" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">所在实验室</label>
                        <div class="layui-input-block">
                            <!--<input type="text" name="lab_id" th:value="${param.lab_id}" placeholder="请输入所在实验室" autocomplete="off" class="layui-input">-->
                            <select name="lab_id" style="width: 90px;height: 38px">
                                    <option th:label="--实验室--"></option>
                                    <!--<option th:if="${labs.indexOf(lab) == 0}">选择实验室</option>-->
                                    <option  th:each="lab:${labs}" th:value="${lab.getId()}" th:label="${lab.getName()}"></option>

                            </select>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">团队类型</label>
                        <div class="layui-input-block">
                            <!--<input type="text" name="type" th:value="${param.type}" placeholder="请输入团队类型" autocomplete="off" class="layui-input">-->
                            <select name="type" style="width: 108px;height: 38px">

                                    <option th:label="--选择团队--"></option>
                                  <!--  <option th:each="type:${types}" th:value="${type.getType()}" th:label="${type.getTypeName()}"></option>-->
                                    <option th:value="0">比赛团队</option>
                                    <option th:value="1">竞赛团队</option>
                                <option value="2">其他</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <button class="layui-btn timo-search-btn">
                            <i class="fa fa-search"></i>
                        </button>
                    </div>
                </div>

            </div>
            <div class="timo-table-wrap">
                <table class="layui-table timo-table">
                    <thead>
                    <tr>
                        <th class="timo-table-checkbox">
                            <label class="timo-checkbox"><input type="checkbox">
                                <i class="layui-icon layui-icon-ok"></i></label>
                        </th>
                        <th>团队名</th>
                        <th>教师主键</th>
                        <th>所在实验室</th>
                        <th>团队人数</th>
                        <th>团队类型</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr th:each="item:${list}">
                        <td><label class="timo-checkbox"><input type="checkbox" th:value="${item.id}">
                            <i class="layui-icon layui-icon-ok"></i></label></td>
                        <td th:text="${item.team_name}">团队名</td>
                        <td th:text="${item.name}">教师主键</td>
                        <td th:text="${item.labName}">所在实验室</td>
                        <td th:text="${item.count}">团队人数</td>
                        <td th:text="${item.type}==1?'项目团队':(${item.type}==0?'比赛团队':'其他')">团队类型</td>
                        <td>
                            <a class="open-popup" data-title="申请团队" th:attr="data-url=@{/SpringBoot/teamApply/add(teamName=${item.team_name})}" data-size="417,600" href="#">申请加入</a>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div th:replace="/common/fragment :: page"></div>
        </div>
    </div>
<script th:replace="/common/template :: script">

</script>
</body>
</html>